package com.shixj.easy.spider.mapper;

import com.shixj.easy.spider.model.Chapter;
import com.shixj.easy.spider.model.Novel;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface ChapterMapper extends Mapper<Chapter> {
   void  batchInsertChapter(List<Chapter> chapters);
   void deleteByNovel(Novel novel);
    List<Chapter>getChapterListAsc(Novel novel);

    Chapter getChapterNOContent(Chapter chapter);

    Long getMinSourceId(@Param("novelId") Long novelId);
    Long getMaxSourceId(@Param("novelId") Long novelId);

    Integer getSourceConut(Chapter chapter);

    Chapter getNextChapter(Chapter chapter);
}